
project(OLMain)

# 收集源文件
file(GLOB_RECURSE SRC_FILES 
    "*.cpp" 
    "*.cxx" 
    "*.cc"
    "*.hpp" 
    "*.h"
    "*.html"  # 包含帮助文档
)

# 创建可执行文件
add_executable(OLMain ${SRC_FILES})

# 查找Qt依赖
find_package(Qt5 COMPONENTS Widgets Core Gui REQUIRED)

# 添加依赖项
target_link_libraries(OLMain 
    PRIVATE 
    Qt5::Widgets
    Qt5::Core
    Qt5::Gui
	OLApp 
	OLCore 
	OLGuiCreator 
	OLOperations
    ${THIRD_PARTY_LIBS}
)

# 添加头文件目录
target_include_directories(OLMain 
    PRIVATE 
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${CMAKE_SOURCE_DIR}/src/OLApp
    ${CMAKE_SOURCE_DIR}/src/OLGuiCreator
    ${CMAKE_SOURCE_DIR}/src/OLCore
    ${CMAKE_SOURCE_DIR}/src/OLOperations 
)

# 禁用编译器警告
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
  target_compile_options(OLMain PRIVATE -w)
endif()
if(MSVC)
  target_compile_options(OLMain PRIVATE /W0)
endif()

